package com.study.manage.dal;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.study.manage.domain.EvaluateDraftDetail;

public interface EvaluateDraftDetailRepository
        extends PagingAndSortingRepository<EvaluateDraftDetail, Long> {

    List<EvaluateDraftDetail> findByEvaluateDraftId(Long evaluateDraftId);

    @Modifying
    @Query("delete from EvaluateDraftDetail t where t.evaluateDraftId=:evaluateDraftId")
    int deleteByEvaluateDraftId(@Param("evaluateDraftId") Long evaluateDraftId);
}
